<template>
    <div style="width: 100%;height: 100%;position: relative">
        <Spin size="large" fix v-if="Loading"></Spin>
        <Form :label-width="180" ref="formValidate" :model="formValidate" id="form">
            <table>
                <tr>
                    <td>
                        <Form-item label="申请人姓名:">
                            <Input v-model="formValidate.azcp0003" :disabled="disabled"/>
                        </Form-item>
                    </td>
                    <td>
                        <Form-item label="身份证号码:">
                            <Input v-model="formValidate.azcp0001" :disabled="disabled"/>
                        </Form-item>
                    </td>
                </tr>
                <tr>
                    <td style="width: 50%">
                        <Form-item label="申请救助类别:">
                            <Input v-model="formValidate.ssca0002_name" :disabled="disabled"/>
                        </Form-item>
                    </td>
                    <td>
                        <Form-item label="家庭人口数:">
                            <Input v-model="formValidate.azcp0004" :disabled="disabled"/>
                        </Form-item>
                    </td>
                </tr>
                <tr>
                    <td style="width: 50%">
                        <Form-item label="家庭月总收入(元):">
                            <Input v-model="formValidate.azcp0005" :disabled="disabled"/>
                        </Form-item>
                    </td>
                    <td>
                        <Form-item label="家庭月人均收入(元):">
                            <Input v-model="formValidate.azcp0006" :disabled="disabled"/>
                        </Form-item>
                    </td>
                </tr>
                <tr>
                    <td style="width: 50%">
                        <Form-item label="是否有机动车:">
                            <c-dict-select v-model="formValidate.azcp0007" dictCode="yesorno" :disabled="disabled" :width="300"/>
                        </Form-item>
                    </td>
                    <td>
                        <Form-item label="人均住房面积(平米):">
                            <Input v-model="formValidate.azcp0009" :disabled="disabled"/>
                        </Form-item>
                    </td>
                </tr>
                <tr>
                    <td style="width: 50%">
                        <Form-item label="测评日期:">
                            <Input v-model="formValidate.azcp0013" :disabled="disabled" />
                        </Form-item>
                    </td>
                    <td>
                        <Form-item label="测评操作人:">
                            <Input v-model="formValidate.azcp0014" :disabled="disabled"/>
                        </Form-item>
                    </td>
                </tr>
                <tr>
                    <td>
                        <Form-item label="测评结果:">
                            <c-text-area v-model="formValidate.azcp0012" :max-length="100" :row=3 width="300" :disabled="disabled"/>
                        </Form-item>
                    </td>
                </tr>
            </table>
        </Form>
        <div id="buttondiv">
            <Button @click="prevStep"> 上一步</Button>
        </div>
    </div>
</template>

<script>
    import {getAction, postAction} from '@/api/request'
    import {CommonMixin} from '@/views/common/js/CommonMixin'
    import '@/views/common/css/common.css'
    import DateFormat from "../../../../plugins/format"


    export default {
        name: "application2",
        mixins: [CommonMixin],
        components: {},
        data() {
            return {
                submitDisabled: true,
                Loading: false,
                familyInfo: {},
                formValidate: {
                    azcp0007: '',
                },
                disabled: true,
            }
        },
        methods: {
            prevStep() {
                let that = this;
                this.$emit('prevStep', that.familyInfo)
            },
        },
        created() {
            let that = this;
            that.familyInfo = that.$parent.$parent.familyInfo;
            that.formValidate = that.familyInfo
            let url = '/api/ac/subsistence/ss02050Service/inserStep3Result'
            // 计算测评结果
            postAction(url, {id:that.formValidate.id}).then((res) => {
                if (res.data.errcode == 0) {
                    that.formValidate = res.data.data;
                    that.formValidate.azcp0013 = DateFormat(that.formValidate.azcp0013, 'YYYY-MM-DD')
                } else {
                    that.$Message.error(res.data.errmsg);
                }
            }).finally(() => {
                that.Loading = false;
            });
        }
    }
</script>

<style scoped src="@/views/common/css/application12.css">

</style>
